
var win = Ti.UI.currentWindow;

Ti.include('background.js');

showLoading();

win.add(headerView);

win.add(viewContainer);

var web = Ti.UI.createWebView( {
	url : Ti.App.Properties.getString('browser_url')
});

viewContainer.add(web);

web.addEventListener("load", function(e) {
	hideLoading();
});

var b = Ti.UI.createButton( {
	title : 'Close',
	style : Ti.UI.iPhone.SystemButtonStyle.PLAIN
});
win.setLeftNavButton(b);
b.addEventListener('click', function() {
	w.close();
});
